import router from "./router";
//定义白名单
router.beforeEach((to, from, next) => {
    if (to.path=='/login'){
        return next()
    }
    if(to.path=='/reg'){
        return next()
    }
    if(!window.sessionStorage.getItem('token')){
        next({'path':'/login'})
    }
    next()
})





